# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=dosbox-staging
pkgver=0.80.1
pkgrel=0
pkgdesc="revitalized dosbox DOS-emulator"
url="https://dosbox-staging.github.io/"
arch="all !x86" # TEXTREL on x86
license="GPL-2.0-or-later"
options="!check" # no
depends="!dosbox" # dosbox provides same binary in /usr/bin/dosbox
makedepends="
	alsa-lib-dev
	fluidsynth-dev
	iir1-dev
	libpng-dev
	libslirp-dev
	opus-dev
	opusfile-dev
	speexdsp-dev
	sdl2-dev
	sdl2_image-dev
	sdl2_net-dev
	cmake
	meson
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dosbox-staging/dosbox-staging/archive/v$pkgver.tar.gz"

build() {
	CFLAGS="$CFLAGS -DLOGURU_STACKTRACES=0" \
	CXXFLAGS="$CXXFLAGS -DLOGURU_STACKTRACES=0" \
	abuild-meson \
	--prefix /usr \
	--buildtype=release \
	-Duse_mt32emu=false \
	-Ddefault_library=shared \
	. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
8d28761e998c033b0cad5ca49c1a094d0ff2ca8a45183101c31805dda6a8e6861805739e723492329cab525af782849ec34ae97d29449d6c50e781475a011561  dosbox-staging-0.80.1.tar.gz
"
